package com.free.bsf.swagger.config;

import com.free.bsf.core.util.ContextUtils;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties
@Data
public class SwaggerProperties {
    @Value("${bsf.swagger.enable:false}")
    private boolean enable;
    @Value("${bsf.swagger.strategy:'simple'}")
    private String strategy;
    @Value("${bsf.swagger.title:${spring.application.name}}")
    private String title;
    @Value("${bsf.swagger.description:''}")
    private String description;
    @Value("${bsf.swagger.version:'1.0'}")
    private String version;

    public static String Project="Swagger";
    public static SwaggerProperties getDefault(){
        return ContextUtils.getBean(SwaggerProperties.class,false);
    }
}
